package com.shiro.token;

import com.bean.UserType;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authc.UsernamePasswordToken;

/**
 * 自定义shiro-token重写类,用于多类型用户校验
 * @author WxrStart
 * @create 2022-05-22 23:01
 */
@Slf4j
public class CustomLoginToken  extends UsernamePasswordToken {
    //登录类型，判断是普通用户登录还是管理员登录
    private String loginType;


    public CustomLoginToken(final String email, final String password,String loginType) {
        super(email,password);
        this.loginType = loginType;
        log.info("CustomLoginToken的构造函数调用了");
    }

    public String getLoginType() {
        log.info("CustomLoginToken的getLoginType调用了");
        return loginType;
    }

    public void setLoginType(String loginType) {
        log.info("CustomLoginToken的setLoginType调用了");
        this.loginType = loginType;
    }


}
